import unittest
import requests
import json
import config as conf
from common import test, json as myjson
from dota.models.DotaFunctioneer import *
from main import clear_database
'''
1. 使用有效的数据创建Catch
2. 使用有效的数据修改Catch信息
'''


class CatchGetTest(test.BaseTestCase):
   
    @property
    def url(self):
        return 'http://localhost:9999/catch'

    def test_get(self):
        # 首先添加,添加操作不应该也调用接口，不然这个test case 就相当于测试了两个接口了。

        response = requests.get(self.url)
        data = response.json()
        self.assertEqual(data['code'], '50000')
        self.assertEqual(data['msg'], '获取成功！')

    